Skip to content

[Scaler] Fix path duplication for request http#82

Merged
TomerShor merged 2 commits intov3io:developmentfrom
weilerN:nuc-602-fix-path-duplication-for-request-http
Sep 22, 2025
Merged

[Scaler] Fix path duplication for request http#82
TomerShor merged 2 commits intov3io:developmentfrom
weilerN:nuc-602-fix-path-duplication-for-request-http

Conversation

@weilerN
Copy link
Collaborator

@weilerN weilerN commented Sep 21, 2025

📝 Description

The changes simplify the handler logic by removing redundant path handling and ensuring that path additions are only applied when explicitly provided via headers.


🛠️ Changes Made

  • Replaced getPathAndResourceNames in favor of a simplified getResourceNames.
  • Updated handleRequest to extract pathAddition only from the pre-configured handler's targetPathHeader.
  • Adjusted cache lookup functions to return only resourceNames instead of (path, resourceNames).

✅ Checklist

  • I have tested the changes in this PR

🧪 Testing

  • Dev QA
    • Created a function that prints the event.path
    • Triggered the function with this command:
      curl print-path.default-tenant.app.vmdev5.lab.iguazeng.com/a/b
    • Before changes:
      "name":"processor.http.w0.python.logger.connection-manager.event","message":"Request path","more":{"path":"/a/b/a/b"}}
    • After changes:
      "name":"processor.http.w0.python.logger.connection-manager.event","message":"Request path","more":{"path":"/a/b"}}
  • Updated UTs and added more cases coverage

🔗 References


🚨 Breaking Changes?

  • Yes (explain below)
  • No

🔍️ Additional Notes

  • Need to discuss weather we still want to support targetPathHeader [link]

@weilerN weilerN marked this pull request as ready for review September 21, 2025 15:21
Copy link
Collaborator

@rokatyy rokatyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@TomerShor TomerShor merged commit 4e44dbc into v3io:development Sep 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants